<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTeachingCommentsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('teaching_comments', function (Blueprint $table) {
//            $table->comment('教研活动评论表');
            $table->bigIncrements('id')->comment('ID');
            $table->bigInteger('activity_id')->default(0)->comment('教研活动表关联id');
            $table->integer('user_id')->default(0)->comment('评论人id');
            $table->string('user_name', 32)->default('')->comment('评论人name');
            $table->text('comment')->comment('评论内容');
            $table->char('comment_time', 6)->nullable()->default('')->comment('评论时间');
            $table->dateTime('created_at')->nullable()->comment('创建时间');
            $table->dateTime('updated_at')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('teaching_comments');
    }
};
